package com.lyh.utils;

import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class c3p0ApplicationContext {

    private static volatile ApplicationContext context ;

    private c3p0ApplicationContext(){

    }

    public static ApplicationContext getC3p0ApplicationContext(){
        if (context != null){
            synchronized (context) {
                if (context != null) {
                    context = new ClassPathXmlApplicationContext("application.xml");
                }
            }
        }
        return context;
    }
}
